package com.uzai.common.enums;

/**
 *
 * 群发不满足条件类型
 * @Auther: xiaoyuexl
 * @Date: 2021/8/13 11:31
 * @Description:
 */
public enum GroupSendErrTypeEnum {
    UNREGISTERED("unregistered","未注册"),
    UNSUBSCRIBED("unsubscribed","未订阅"),
    DO_NOT_DISTURB("doNotDisturb","免打扰"),
    NOT_IN_CONTACTS("notInContacts","不在通讯录"),
    REG_TIME_ERR("regTimeErr","注册时间"),
    LAST_ORDER_TIME_ERR("lastOrderTimeErr","最后下单时间"),
    USER_TYPE_ERR("userTypeErr","会员类型"),
    REMARK_ERR("remarkErr","备注"),
    NICK_ERR("nickErr","昵称"),
    TAGS_ERR("tagsErr","标签"),
    USER_TAGS_ERR("userTagsErr","用户标签"),
    BAL_ERR("balErr","余额"),
    GENDER_ERR("genderErr","性别"),
    PRI_REWARDRULE_ERR("priRewardruleErr","定向规则"),
    ORDER_ERR("orderErr","订单不满足"),
    TB_LAST_ORDER_NO("tbLastOrderNo","淘宝订单尾号不满足"),
    BLACK_LIST("blackList","黑名单"),
    REG_CHANNEL("regChannel","注册来源")
    ;

    private String id;
    private String desc;

    GroupSendErrTypeEnum(String id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static GroupSendErrTypeEnum getById(String id) {
        if (id == null) {
            return null;
        }
        for (GroupSendErrTypeEnum type: GroupSendErrTypeEnum.values()) {
            if (type.getId().equals(id)) {
                return type;
            }
        }
        return null;
    }
}
